<!DOCTYPE html>
<html>
<head>

	<!--Copyright 2016, RadiantBlue Technologies, Inc.

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.-->

	<title>nearsight-viewer</title>
	<meta charset="utf-8" />

	<meta name="viewport" content="width=device-width, initial-scale=1.0">

    {% load staticfiles %}

	<link rel="stylesheet" href="{% static "nearsight/leaflet/leaflet.css" %}" />
	<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css" />
	<link rel="stylesheet" href="{% static "nearsight/Leaflet.MousePosition/src/L.Control.MousePosition.css" %}" />
	<link rel="stylesheet" href="{% static "nearsight/LeafletMiniMap/src/Control.MiniMap.css" %}" />
    <link rel="stylesheet" href="{% static "nearsight/font-awesome-4.5.0/css/font-awesome.min.css" %}"/>
	<link rel="stylesheet" href="{% static "nearsight/LeafletLocateControl/src/L.Control.Locate.css" %}"/>
	<link rel="stylesheet" href="{% static "nearsight/Leaflet.ZoomHome/dist/leaflet.zoomhome.css" %}"/>
	<link rel="stylesheet" href="{% static "nearsight/Leaflet.EasyButton/src/easy-button.css" %}"/>
	<link rel="stylesheet" href="{% static "nearsight/Leaflet.ZoomBox/L.Control.ZoomBox.css" %}"/>
	<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
	<link rel="stylesheet" href="{% static "nearsight/map.css" %}"/>
	<link rel="stylesheet" href="{% static "nearsight/Leaflet.groupedlayercontrol/src/leaflet.groupedlayercontrol.css" %}"/>

</head>
<body>

	<div id="map"></div>

	<div id="placeholder"></div>
	
	<div id="waiting" title="Waiting for layer return">
		<i class="fa fa-cog fa-spin fa-2x"></i>
	</div>

	<form id="timeoutForm" title="Alert Timeout Controller" visibility="hidden">
			<label for="timeout" style="display: block;" id="timeoutLabel">Enter minutes for feature timeout,<br>or enter 0 to disable timeout.</label></br>
			<input type="text" name="timeout" id="timeout" value="" style="display: block;" class="text ui-widget-content ui-corner-all"/>
    </form>

	<form id="colortimeForm" title="Alert Color Controller" visibility="hidden">
			<label for="colortime" style="display: block;" id="colortimeLabel">Enter minutes for new feature color,<br>or enter 0 to disable alert color.</label></br>
			<input type="text" name="colortime" id="colortime" value="" style="display: block;" class="text ui-widget-content ui-corner-all"/>
	</form>

	<form id="refreshForm" title="Layer Refresh Controller" visibility="hidden">
			<label for="refresh" style="display: block;" id="refreshLabel">Enter seconds for layer refresh,<br>default is 60.</label></br>
			<input type="text" name="refresh" id="refresh" value="" style="display: block;" class="text ui-widget-content ui-corner-all"/>
	</form>

    <div id="formContainer" title="Upload File">
        <form id="fileUpload" enctype="multipart/form-data" visibility="hidden">
            <div >
                <input id="uploadFormButton"  name="file" type="file" />
				{% csrf_token %}
            </div>
        </form>
		<div>
        	<progress id='progress' value="0.0" max="1.0"></progress>
		</div>
		<div id='nearsightStatus'></div>
		<div id ="nearsightStatusLogContainer">
			Status Log
			<textarea id ="nearsightStatusLog" readonly></textarea>
		</div>
    </div>


    <script src="{% static "nearsight/leaflet/leaflet.js" %}"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js"></script>
	<script src="{% static "nearsight/Leaflet.MousePosition/src/L.Control.MousePosition.js" %}"></script>
    <script src="{% static "nearsight/LeafletMiniMap/src/Control.MiniMap.js" %}"></script>
    <script src="{% static "nearsight/LeafletLocateControl/src/L.Control.Locate.js" %}"></script>
    <script src="{% static "nearsight/Leaflet.ZoomHome/dist/leaflet.zoomhome.js" %}"></script>
    <script src="{% static "nearsight/Leaflet.EasyButton/src/easy-button.js" %}"></script>
	<script src="{% static "nearsight/Leaflet.ZoomBox/L.Control.ZoomBox.min.js" %}"></script>
	<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
	<script src="{% static "nearsight/Leaflet.groupedlayercontrol/src/leaflet.groupedlayercontrol.js" %}"></script>
    <script type="text/javascript">
    	{% autoescape off %}
    		var basemapInfo = {{basemaps}}
    	{% endautoescape %}
    </script>
	<script src="{% static "nearsight/map.js" %}"></script>

</body>
</html>
